]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NMWirelessDialog: request a scan when there are no visible access points
authorGiovanni Campagna <gcampagna@src.gnome.org>
Wed, 29 Jan 2014 21:28:17 +0000 (22:28 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 4 Feb 2014 21:24:01 +0000 (22:24 +0100)
Ideally, we should keep scanning while the dialog is open, and
stop (or reduce the frequency) when it's closed. Forcing a new
scan when the dialog is opened empty is a close approximation
and increases the probability that the user will find the AP
he needs.

https://bugzilla.gnome.org/show_bug.cgi?id=709128

js/ui/status/network.js

index ab67e820f20356c7642ecc531fdab71f95cacc2e..8962ced6cf4b3f8d0197af6dce1182b3c41386fc 100644 (file)
@@ -669,6 +669,11 @@ const NMWirelessDialog = new Lang.Class({
         this._selectedNetwork = null;
         this._activeApChanged();
         this._updateSensitivity();
+
+        if (accessPoints.length == 0) {
+            /* If there are no visible access points, request a scan */
+            this._device.request_scan_simple(null);
+        }
     },
 
     destroy: function() {